package phoenix.web.locators.base;

import org.openqa.selenium.By;

/**
 * Class provides base locators on Funnel page
 */
public abstract class FunnelPageLocatorsBase
{
	// Funnel form
	public By blockFunnelPopup = By.id("funnel-popup-item");
	public By txtScreenName = By.id("funnel-form-user-screenname");
	public By txtDescription = By.id("funnel-form-user-chatupline");
	public By selectGender = By.id("funnel-form-select-gender");
	public By selectAgeFrom = By.id("funnel-form-select-from-age");
	public By selectAgeTo = By.id("funnel-form-select-to-age");
	public By selectDistance = By.id("funnel-form-distance");
	public By txtLocation = By.id("funnel-form-location");
	public By btnNextStep = By.id("funnel-form-button-next-step");
	public By btnSave = By.id("funnel-form-button-submit-data");

	public By blockPhotoUploader = By.id("PhotoUploadForm-form");
	public By inputFile = By.xpath("(.//*[@name='file'])[2]");
	public By blockPhotoImage = By.xpath(".//*[@id='profile-uploaded-photos']//img");
	public By btnRemovePhoto = By.cssSelector(".btn.btn-remove");
	public By blockPhotoPopUp = By.xpath("//div[@class='b-popup b-popup-funnel step-2']");

	// Additional elements for FGF
	public By selectHeight;
	public By selectWeight;
	public By selectMaritalStatus;
	public By selectNativeLanguage;
	public By selectSecondLanguage;
	public By txtHobbiesAndInterests;

	public By selectGenderMale = null;
	public By selectGenderFemale = null;

	//TODO REMOVE STRING LOCATORS!!!!
	public String liAgeFrom = "//*[@class='field age-to']//ul[@class='nav']//li";
	public String liAgeTo = "//*[@class='field age-from']//ul[@class='nav']//li";

	public By methodAgeTo(int p_index)
	{
		return null;
	}

	public By methodAgeFrom(int p_index)
	{
		return null;
	}

	public By selectByLocator(String p_name, String p_value)
	{
		return By.xpath("//div[@class='field " + p_name + " select-output-dropdown dark active']/*//ul/li[@data-item='" + p_value + "']");
	}

	public By clickSuggection(String p_value)
	{
		return By.xpath("//li[@data-suggest-list-item='" + p_value + "']");
	}
}
